package com.fjeld.server.ssl.impl;

import com.fjeld.middleware.activemq.MessagesPublisher;
import com.fjeld.middleware.activemq.TopicPublisher;
import com.fjeld.middleware.constants.PropertiesManager;
import com.fjeld.server.ssl.ServerStackLayer;
import org.apache.log4j.Logger;

import javax.jms.JMSException;

/**
 * Created by IntelliJ IDEA.
 * User: fjeld
 * Date: 29/12/2011
 * Time: 16:31
 * To change this template use File | Settings | File Templates.
 */
public class TestServerStack extends AbstractServerStack implements ServerStackLayer
{
    private static final Logger LOGGER = Logger.getLogger(HeartbeatPublisherStack.class);

    public TestServerStack() throws JMSException
    {
        LOGGER.info("Initialising");

        // Set up the publisher.
        String topicMessageResponse = PropertiesManager.getProperties().getProperty("Topic.Request.Prefix") + "." + serverName;

        TopicPublisher publisher = new MessagesPublisher(topicMessageResponse, serverName + ".MessagePublisherStack");
        publisher.startConnection();

        LOGGER.info("Finished initialising");
    }

}
